package com.yjd.bi.user.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Component;

import com.yjd.bi.user.dao.ILoginRetentionRateDao;
import com.yjd.bi.user.dto.RetentionRateDTO;
import com.yjd.bi.user.model.LoginRetentionRateModel;
import com.yjd.comm.base.dao.impl.BaseDaoImpl;

/**
 * <b>description</b>：用户留存率数据访问层 <br>
 * <b>time</b>：2016-04-21 10:39:32 <br>
 * <b>author</b>： renbangjie renbangjie@126.com
 */
@Component("loginRetentionRateDao")
public class LoginRetentionRateDaoImpl extends BaseDaoImpl implements
		ILoginRetentionRateDao {

	private static final String SQLMAPNAMESPACE = LoginRetentionRateModel.class
			.getName();
	private static final String PKNAME = "id";

	@Override
	public String getPrimaryKeyName() {
		return PKNAME;
	}

	@Override
	public String getSqlmapNamespace() {
		return SQLMAPNAMESPACE;
	}

	
	@SuppressWarnings("unchecked")
	@Override
	public List<RetentionRateDTO> getUserCount(Map<String, Object> paramMap)
			throws Exception {
		return this.getSqlMap(false).queryForList(getStatement("getUserCount"), paramMap);
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<RetentionRateDTO> getUserList(Map<String, Object> paramMap)
			throws Exception {
		return this.getSqlMap(false).queryForList(getStatement("getUserList"), paramMap);
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<RetentionRateDTO> getUserLoginList(
			Map<String, Object> paramMap) throws Exception {
		return this.getSqlMap(false).queryForList(getStatement("getUserLoginList"), paramMap);
	}

}
